package com.example.hxds.bff.driver.service.impl;

import com.example.hxds.bff.driver.controller.form.ReceiveNewOrderMessageForm;
import com.example.hxds.bff.driver.feign.SnmServiceApi;
import com.example.hxds.bff.driver.service.NewOrderMessageService;
import com.example.hxds.common.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class NewOrderMessageServiceImpl implements NewOrderMessageService {

    @Autowired
    private SnmServiceApi snmServiceApi;

    @Override
    public ArrayList receiveNewOrderMessage(ReceiveNewOrderMessageForm form) {
        R r = snmServiceApi.receiveNewOrderMessage(form);
        ArrayList result = (ArrayList) r.get("result");
        return result;
    }
}
